package com.bawei.module_mine.repository

import com.bawei.module_mine.api.Api
import com.bawei.module_mine.api.MineNetModel
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.flow.flowOn
import javax.inject.Inject

class RegisterRepository @Inject constructor(){
    @Inject
    @MineNetModel.CommonHomeApi
    lateinit var api: Api
    fun register(username:String,password:String)= flow{
        emit(api.register(username,password))
    }.flowOn(Dispatchers.IO)
}